#pragma once

#ifdef _WIN32
namespace one_rag {
  struct IGlutClient;
  namespace detail {

    class Win32GLWindow : public View
    {
        HGLRC _glrc;
      protected:
        IGlutClient* _delegate;
      public:
        Win32GLWindow();
        virtual ~Win32GLWindow();
        HWND Create(Window& parent,int x=0,int y=0,int w=-1,int h=-1);
        void PostRedisplay();

      protected:
        void EnableOpenGL();
        void DisableOpenGL();
        LRESULT WindowProc(UINT uMsg,WPARAM wParam ,LPARAM lParam);
    };
    typedef Win32GLWindow GlView;
  }
}
#endif
